Optimal. Leaf size=34 \[ \frac {a^2 \sin (c+d x)}{d}+\frac {a^2 \tanh ^{-1}(\sin (c+d x))}{d}+2 a^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3788, 8, 4045, 3770} \[ \frac {a^2 \sin (c+d x)}{d}+\frac {a^2 \tanh ^{-1}(\sin (c+d x))}{d}+2 a^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3770
Rule 3788
Rule 4045
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sec (c+d x))^2 \, dx &=\left (2 a^2\right ) \int 1 \, dx+\int \cos (c+d x) \left (a^2+a^2 \sec ^2(c+d x)\right ) \, dx\\ &=2 a^2 x+\frac {a^2 \sin (c+d x)}{d}+a^2 \int \sec (c+d x) \, dx\\ &=2 a^2 x+\frac {a^2 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 47, normalized size = 1.38 \[ \frac {a^2 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 \sin (c) \cos (d x)}{d}+\frac {a^2 \cos (c) \sin (d x)}{d}+2 a^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 53, normalized size = 1.56 \[ \frac {4 \, a^{2} d x + a^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, a^{2} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.41, size = 79, normalized size = 2.32 \[ \frac {2 \, {\left (d x + c\right )} a^{2} + a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.54, size = 51, normalized size = 1.50 \[ 2 a^{2} x +\frac {a^{2} \sin \left (d x +c \right )}{d}+\frac {a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {2 a^{2} c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.83, size = 52, normalized size = 1.53 \[ \frac {4 \, {\left (d x + c\right )} a^{2} + a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, a^{2} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.70, size = 33, normalized size = 0.97 \[ 2\,a^2\,x+\frac {a^2\,\left (2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+\sin \left (c+d\,x\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int 2 \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cos {\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________